<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div class="clearfix">
    <h2>
      <a class="title1">求职简历</a>
    </h2>
    <span>
      <a>销售</a>
    </span>
    <span>
      <a>导购</a>
    </span>
    <span>
      <a>厨师</a>
    </span>
    <span>
      <a>房产经纪</a>
    </span>
    <span>
      <a>文员</a>
    </span>
    <span>
      <a>收银</a>
    </span>
    <span>
      <a>配菜</a>
    </span>
    <span>
      <a>保险经纪</a>
    </span>
    <span>
      <a>前台</a>
    </span>
    <span>
      <a>营业员</a>
    </span>
    <span>
      <a>服务员</a>
    </span>
    <span>
      <a>人事/行政</a>
    </span>
    <span>
      <a>客服</a>
    </span>
    <span>
      <a>保安</a>
    </span>
    <span>
      <a>洗碗工</a>
    </span>
    <span>
      <a>平面设计</a>
    </span>
    <span>
      <a>会计</a>
    </span>
    <span>
      <a>电工</a>
    </span>
    <span>
      <a>迎宾</a>
    </span>
    <span>
      <a>仓库管理</a>
    </span>
    
    <!-- 用 p标签 clear 来清除浮动 -->
    <!-- <p>I am a P tag</p> -->
  </div>
  <style>
    div {
      width: 300px;
      padding: 10px;
      background-color: rgb(245, 230, 100);
      /* 用overflow: hidden / auto 来清除浮动 */
      /* overflow: hidden; */

      /* 将父元素也设置浮动来清除浮动 */
      /* float: right; */
    }

    div span {
      /* display: inline-block; */
      width: 25%;
      /* 添加浮动使得元素对齐 */
      float: left;
      color: rgb(89, 156, 255);
    }

    div p {
      color: white;
      background-color: rgb(100, 100, 173);
      text-align: center;
      clear: both;
    }

    /* 用伪元素清除浮动 */
    /* 最推荐的方法 */
    div.clearfix::after {
      content: '';
      display: block;
      clear: both;
    }
  </style>
</body>
</html>